home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 November
/
CMCD1104.ISO
/
Software
/
Freeware
/
Grafica
/
galeroo
/
Setup Galleroo 3.4.exe
/
{app}
/
styles
/
Pratim
/
gallery.xsl
Wrap
Extensible Markup Language
|
2004-09-20
|
13KB
|
277 lines
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
xmlns:func="http://exslt.org/functions"
xmlns:dyn="http://exslt.org/dynamic"
xmlns:math="http://exslt.org/math"
xmlns:str="http://exslt.org/strings"
xmlns:g="."
xmlns:galleroo="."
extension-element-prefixes="dyn func exsl math str g galleroo"
version='1.1'>
<xsl:include href="../Lib/galleroo.xsl" />
<xsl:output method="html" />
<!-- doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" indent="yes" -->
<!-- Galleroo Details XSL XML->HTML stylesheet 1.1
Copyright 2003-2004, all rights reserved, xyster.net
written: 7/12/03
modified:
author: xyster
-->
<!-- The following XSL parameters are what will appear in Galleroo as options for this
style, in addition to the mandatory options shared by all styles.
The parameter block must be contiguous without any spaces (either empty lines or comments)
in it for Galleroo to detect all options.
Parameter defaults must be specified as a value in between the tags. Specifying
a default using the select attribute is not supported.
-->
<xsl:param name="title">Photo Gallery</xsl:param>
<xsl:param name="sub-title" />
<xsl:param name="text-color">#CCCCCC</xsl:param>
<xsl:param name="nav-background-color">#000000</xsl:param>
<xsl:param name="slide-background-color">#000000</xsl:param>
<xsl:param name="link-color">#FFFFFF</xsl:param>
<xsl:param name="visited-link-color">#999999</xsl:param>
<xsl:param name="active-link-color">#FF0000</xsl:param>
<xsl:param name="home-image">home.gif</xsl:param>
<xsl:param name="sort-by">date</xsl:param>
<xsl:param name="thumb-size">128</xsl:param>
<xsl:param name="image-size">600</xsl:param>
<xsl:param name="do-three-stage">no</xsl:param>
<xsl:param name="html-file-prefix" />
<xsl:param name="do-auto-play-movies">no</xsl:param>
<xsl:param name="nav-background-image" />
<xsl:param name="slide-background-image" />
<xsl:param name="custom-css-file" />
<xsl:param name="font" />
<xsl:param name="_preview">0</xsl:param>
<xsl:template match="list">
<!-- nav css -->
<xsl:call-template name="gal-emit-css-file">
<xsl:with-param name="name" select="'index'" />
<xsl:with-param name="html-file-prefix" select="$html-file-prefix" />
<xsl:with-param name="background-image" select="$nav-background-image" />
<xsl:with-param name="background-color" select="$nav-background-color" />
<xsl:with-param name="font" select="$font" />
<xsl:with-param name="text-color" select="$text-color" />
<xsl:with-param name="link-color" select="$link-color" />
<xsl:with-param name="active-link-color" select="$active-link-color" />
<xsl:with-param name="visited-link-color" select="$visited-link-color" />
</xsl:call-template>
<!-- slide css -->
<xsl:call-template name="gal-emit-css-file">
<xsl:with-param name="name" select="'slide'" />
<xsl:with-param name="html-file-prefix" select="$html-file-prefix" />
<xsl:with-param name="background-image" select="$slide-background-image" />
<xsl:with-param name="background-color" select="$slide-background-color" />
<xsl:with-param name="font" select="$font" />
<xsl:with-param name="text-color" select="$text-color" />
<xsl:with-param name="link-color" select="$link-color" />
<xsl:with-param name="active-link-color" select="$active-link-color" />
<xsl:with-param name="visited-link-color" select="$visited-link-color" />
</xsl:call-template>
<!-- frameset -->
<xsl:call-template name="gal-emit-frameset">
<xsl:with-param name="preview" select="$_preview" />
<xsl:with-param name="title" select="$title" />
<xsl:with-param name="sub-title" select="$sub-title" />
<xsl:with-param name="nav-alignment" select="'left'" />
<xsl:with-param name="sort-by" select="$sort-by" />
<xsl:with-param name="thumb-size" select="$thumb-size" />
<xsl:with-param name="padding" select="84" />
<xsl:with-param name="html-file-prefix" select="$html-file-prefix" />
</xsl:call-template>
<!-- initial blank page -->
<xsl:call-template name="gal-emit-blank-slide">
<xsl:with-param name="title" select="$title" />
<xsl:with-param name="sub-title" select="$sub-title" />
<xsl:with-param name="css-name" select="'slide'" />
<xsl:with-param name="custom-css-file" select="$custom-css-file" />
<xsl:with-param name="html-file-prefix" select="$html-file-prefix" />
</xsl:call-template>
<!-- nav -->
<html>
<head>
<link type="text/css" rel="stylesheet" href="{$html-file-prefix}index.css" />
<xsl:if test="string-length($custom-css-file) != 0">
<link type="text/css" rel="stylesheet" href="{$custom-css-file}" />
</xsl:if>
<title>Nav Bar</title>
</head>
<body class="index-page">
<!-- home link -->
<div align="center">
<a href="../index.html" target="_top"><img src="{$home-image}" border="0" /></a>
</div>
<!-- thumbnails -->
<div align="center">
<table class="thumb-table" align="center" cellspacing="10" border="0">
<xsl:for-each select="media/object/children/object/children/object">
<xsl:sort select="attrib/*[name()=$sort-by]" />
<xsl:choose>
<!-- video -->
<xsl:when test="attrib/format = 'video'">
<tr>
<td align="center"><a target="main" href="{$html-file-prefix}{attrib/name}.html"><img class="thumb" width="{attrib/thumb-x-size}" height="{attrib/thumb-y-size}" src="{attrib/thumb-path}/{attrib/thumb-name}" border="2" /></a></td>
</tr>
<xsl:if test="not (attrib/x-size)">
<tr>
<td align="center"><a target="main" href="{$html-file-prefix}{attrib/name}.html"><xsl:value-of select="galleroo:image-title(attrib)" /></a></td>
</tr>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<tr>
<td align="center"><a target="main" href="{$html-file-prefix}{attrib/name}.html"><img class="thumb" width="{attrib/thumb-x-size}" height="{attrib/thumb-y-size}" src="{attrib/thumb-path}/{attrib/thumb-name}" border="2" /></a></td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</table>
</div>
<!-- lister signature -->
<div align="center"><a href="http://www.xyster.net" target="_top"><xsl:value-of select="/list/generator" /></a></div>
</body>
</html>
<!-- cutter output -->
<xsl:text> </xsl:text>
<xsl:comment>CUTHERE: <xsl:value-of select="galleroo:rplstr($html-file-prefix, '-', '\-')" />nav.html ?</xsl:comment>
<xsl:text> </xsl:text>
<!-- generate the picture pages -->
<xsl:call-template name="pages">
<xsl:with-param name="pix" select="media/object/children/object/children/object" />
</xsl:call-template>
</xsl:template>
<xsl:template name="pages">
<xsl:param name="pix" />
<xsl:for-each select="$pix">
<html>
<xsl:comment> Transformed from XML with Galleroo Details XSL stylesheet 1.0 </xsl:comment>
<xsl:comment> Source path='<xsl:value-of select="/list/media/basepath" />' </xsl:comment>
<head>
<link type="text/css" rel="stylesheet" href="{$html-file-prefix}slide.css" />
<xsl:if test="string-length($custom-css-file) != 0">
<link type="text/css" rel="stylesheet" href="{$custom-css-file}" />
</xsl:if>
<title><xsl:value-of select="galleroo:image-title(attrib)" /></title>
</head>
<body class="slide-page">
<!-- title -->
<div style="align:left;"><h4><xsl:value-of select="$title" /> - <xsl:value-of select="$sub-title" /></h4></div>
<!-- subtitle -->
<div style="align:left;"><h5><xsl:value-of select="galleroo:image-title(attrib)" /><xsl:value-of select="galleroo:image-caption(attrib)" /></h5></div>
<!-- the full size image/video -->
<div style="align:left;">
<table border="0">
<tr height="{$image-size}">
<td width="{$image-size}" valign="top">
<xsl:call-template name="gal-emit-image">
<xsl:with-param name="do-auto-play-movies" select="$do-auto-play-movies" />
</xsl:call-template>
</td>
<xsl:if test="attrib/format != 'video'">
<td valign="top">
<p>
Date: <xsl:value-of select="attrib/date" /><br />
<xsl:call-template name="gal-emit-exposure" /><br />
<xsl:call-template name="gal-emit-f-stop" /><br />
<xsl:call-template name="gal-emit-focal-distance" /><br />
<xsl:call-template name="gal-emit-flash-used" /><br />
<xsl:call-template name="gal-emit-is-color" /><br />
</p>
<p>
<xsl:call-template name="gal-emit-name-value-string">
<xsl:with-param name="name" select="'Camera Manufacturer: '" />
<xsl:with-param name="value" select="attrib/camera-make" />
</xsl:call-template><br />
<xsl:call-template name="gal-emit-name-value-string">
<xsl:with-param name="name" select="'Camera Model: '" />
<xsl:with-param name="value" select="attrib/camera-model" />
</xsl:call-template><br />
<xsl:call-template name="gal-emit-ccd-width" /><br />
</p>
<p>
Displayed Dimensions: <xsl:value-of select="attrib/full-x-size" />x<xsl:value-of select="attrib/full-y-size" /><br />
Original Dimensions: <xsl:value-of select="attrib/x-size" />x<xsl:value-of select="attrib/y-size" /><br />
Original File Size: <xsl:number value="attrib/file-size" grouping-separator="," grouping-size="3" />
(<xsl:number value="attrib/file-size div 1024" grouping-separator="," grouping-size="3" />KB)<br />
<xsl:call-template name="gal-emit-exif-version" /><br />
</p>
<p>
<xsl:if test="boolean(attrib/original-path)">
<a href="{attrib/original-path}/{attrib/name}">Download Original</a>
</xsl:if>
</p>
</td>
</xsl:if>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
</table>
<!-- comment -->
<div style="align:left; width:50%; padding:1em;">
<xsl:call-template name="gal-emit-name-value-string">
<xsl:with-param name="name" select="'City: '" />
<xsl:with-param name="value" select="galleroo:iptc(attrib, 'city')" />
</xsl:call-template><br/>
<xsl:call-template name="gal-emit-name-value-string">
<xsl:with-param name="name" select="'State/Province: '" />
<xsl:with-param name="value" select="galleroo:iptc(attrib, 'state')" />
</xsl:call-template><br/>
<xsl:call-template name="gal-emit-name-value-string">
<xsl:with-param name="name" select="'Country: '" />
<xsl:with-param name="value" select="galleroo:iptc(attrib, 'country')" />
</xsl:call-template><br/>
<br />
<xsl:value-of select="galleroo:image-comment(attrib)" /><br />
</div>
</div>
</body>
</html>
<!-- cutter output -->
<xsl:call-template name="gal-emit-cutter-slide">
<xsl:with-param name="html-file-prefix" select="$html-file-prefix" />
</xsl:call-template>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>